<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>模板管理</title>
    <link rel="stylesheet" href="../../../assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="../../../assets/module/dtree/dtree.css"/>
    <link rel="stylesheet" href="../../../assets/module/dtree/font/dtreefont.css"/>
    <link rel="stylesheet" href="../../../assets/module/admin.css?v=313"/>

    <link rel="stylesheet" href="../../../assets/libs/ztree/css/zTreeStyle/zTreeStyle.css">

    <link rel="stylesheet" href="../../../assets/css/publicStyle.css"/>
    <script src="../../../assets/libs/jquery/jquery-3.2.1.min.js"></script>

    <!--[if lt IE 9]>
    <script src="../../../assets/libs/html5shiv.min.js"></script>
    <script src="../../../assets/libs/respond.min.js"></script>
    <![endif]-->
    <script src="../../../assets/libs/template-web.js"></script>
    <link rel="stylesheet" href="../../../assets/css/macro/templateManage.css">
</head>
<body>

<!-- 加载动画 -->
<div class="page-loading">
    <div class="ball-loader">
        <span></span><span></span><span></span><span></span>
    </div>
</div>

<!-- 正文开始 -->
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <!-- 指标和维度 -->
        <div class=" layui-col-sm12 layui-col-md2 layui-col-lg2">
            <div class="layui-card">
                <div class="layui-card-header">指标和维度</div>
                <div class="layui-card-body" >
                    <div class="layui-collapse" lay-accordion="" lay-filter="idenAndGroup">
                        <div class="layui-colla-item" >
                            <h2 class="layui-colla-title" type="iden">指标</h2>
                            <div class="layui-colla-content layui-show">
                                <div class="categoryDiv">
                                    <ul id="iden" class="ztree templateIdenHeight"></ul>
                                </div>
                            </div>
                        </div>
                        <div class="layui-colla-item" >
                            <h2 class="layui-colla-title" type="comparsion">指标对比类型</h2>
                            <div class="layui-colla-content">
                                <ul id="idencomparsion" class="ztree templateIdenHeight" ></ul>
                            </div>
                        </div>
                        <div class="layui-colla-item" >
                            <h2 class="layui-colla-title" type="group">分组</h2>
                            <div class="layui-colla-content">
                                <ul id="group" class="ztree templateIdenHeight" ></ul>
                            </div>
                        </div>
                        <div class="layui-colla-item" id="regionTableBox">
                            <h2 class="layui-colla-title" type="region">区划</h2>
                            <div class="layui-colla-content">
                                <form class="layui-form" action="">
                                        <label class="layui-form-label regionLabel">区划配置</label>
                                        <div class="layui-input-block regionSetSelect">
                                            <select name="regionSet" lay-filter="regionSet" id="region-tree-box">
                                            </select>
                                        </div>
                                </form>
                                <div style="margin-bottom: 10px;border-bottom: 1px solid #dfe6ec;"></div>
                                <ul id="groupRegion" class="ztree templateRegionHeight" ></ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 栏目 -->
        <div class=" layui-col-sm12 layui-col-md2 layui-col-lg2">
            <div class="layui-card">
                <div class="layui-card-header">栏目</div>
                <div class="layui-card-body" >
                    <div class="layui-tab layui-tab-brief"  lay-filter="xyTab">
                        <ul class="layui-tab-title">
                            <li class="layui-this" type="x">主栏</li>
                            <li type="y">宾栏</li>
                        </ul>
                        <div class="layui-tab-content" style="height: 100px;">
                            <div class="layui-tab-item layui-show">
                                <ul id="x" class="ztree xTableHeight" ></ul>
                            </div>
                            <div class="layui-tab-item">
                                <ul id="y" class="ztree xTableHeight" ></ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 模板 -->
        <div class="layui-col-sm12 layui-col-md10 layui-col-lg8">
            <div class="layui-card">
                <div class="layui-card-header templateTitle">
                    模板
                    <div id="templateManage-tmpl-box"></div>
                </div>
                <div class="layui-card-body mini-bar" >
                    <div class="templatetablecontent" >
                        <div class="my-table" id="my-table">

                            <!--生成的表 start-->
                            <div class="row tableWidth" >
                                <div id="left_div1" class="table">
                                    <table id="cross_table">
                                        <tbody></tbody>
                                    </table>
                                </div>
                                <div id="right_div1" class="table">
                                    <div id="right_divx" class="table">
                                        <table id="column_table">
                                            <tbody></tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                            <div class="column tableWidth" >
                                <div id="left_div2" class="table">
                                    <table id="row_table">
                                        <tbody></tbody>
                                    </table>
                                </div>
                                <div id="right_div2" class="table dataTable template_rightdiv2">
                                    <table id="data_table">
                                        <tbody></tbody>
                                    </table>
                                </div>
                            </div>
                            <!--生成的表 end-->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 模板管理按钮权限 -->
<script type="text/tmpl" id="templateManage-tmpl">
    {{ if hasPower("/macro/macroMeta/template:transposition")}}
    <a class="layui-btn layui-btn-sm layui-btn-warning" id="switchTable" >转置</a>
    {{/if}}
    {{ if hasPower("/macro/macroMeta/template:build")}}
    <a class="layui-btn layui-btn-sm layui-btn-primary " id="buildTables">生成模板</a>
    {{/if}}
    {{ if hasPower("/macro/macroMeta/template:save")}}
    <a class="layui-btn layui-btn-sm layui-btn-primary " id="saveTemple">保存模板</a>
    {{/if}}
    {{ if hasPower("/macro/macroMeta/template:delete")}}
    <a class="layui-btn layui-btn-sm layui-btn-primary " id="deleteTemple">清空模板</a>
    {{/if}}
     {{ if hasPower("/macro/macroMeta/template:tableExpand")}}
    <a class="layui-btn layui-btn-sm layui-btn-primary " id="openTableDialog">表格放大</a>
    {{/if}}

</script>

<script type="text/tmpl" id="region-tree-tmpl">
    {{ each records}}
     <option value="{{$value.id}}">{{$value.name}}</option>
    {{/each}}
</script>

<!-- js部分 -->
<script type="text/javascript" src="../../../assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="../../../assets/js/common.js?v=313"></script>

<!-- 表格部分 -->
<script src="../../../assets/js/table/jquery.table.js"></script>


<!-- Ztree树部分 -->
<script src="../../../assets/libs/ztree/js/jquery.ztree.core.min.js"></script>
<script src="../../../assets/libs/ztree/js/jquery.ztree.exedit.js"></script>
<script src="../../../assets/libs/ztree/js/jquery.ztree.excheck.min.js"></script>
<script src="../../../assets/libs/copy/clipboard.min.js"></script>

<script src="../../../assets/libs/template-web.js"></script>
<script src="../../../assets/libs/axios.min.js"></script>
<script src="../../../assets/js/config.js"></script>
<script src="../../../assets/js/authority.js"></script>
<script src="../../../assets/js/macro/common.js"></script>

<script src="../../../assets/js/config/region.js"></script>
<script src="../../../assets/js/config/macroTable.js"></script>
<script src="../../../assets/js/macro/macroMeta/templateManage.js"></script>

</body>

</html>